#ifndef __RF_CONTROL_H
#define __RF_CONTROL_H
#include "main.h"


#define ENABLE_PA_TX_PORT		P0_3 = 1
#define DISABLE_PA_TX_PORT		P0_3 = 0//PA_TXEN_PORT->ODR &= (uint8_t)(~PA_TXEN_PIN);//GPIO_WriteLow(PA_TXEN_PORT, PA_TXEN_PIN)
#define INIT_PA_TX_PORT         P0DIR |= 1 << 3




void RFConnectInit(void);

uint16_t SLT_cb(void);
uint16_t link_send (void);
uint16_t ClosePa(void);

uint16 CalDataCRC(uint32 TempID, uint8 *data, uint8 DataLength);

void TestTxIDAndFrequencyHandler(void);
void RFIRQHandler(void);
void InitNRF24L01IRQ(void);

void PrepareRfPacket();
void SendRfPacket();



#endif	


